import { Tree } from 'antd';
import React, { Component } from 'react'
import menuConfig from '../../config/menuConfig'

export default class FormJurisdiction extends Component {
  state = {
    checkedKeys:this.props.role.menus
  }
  onCheck = (checkedKeys, info) => {
    this.setState({checkedKeys})

  };
  getMenus = () => this.state.checkedKeys
  render() {
    return (
      <Tree checkable selectable={false} defaultExpandAll={true}
        defaultCheckedKeys={this.state.checkedKeys}
        onCheck={this.onCheck} treeData={menuConfig} 
      />
    )
  }
}
